<div class="spec-menu handles" style="height:25px;">
<{if $spec}>
    <{foreach from=$spec item=aSpec }>
            <{if $aSpec.spec|is_array}>
                <{assign var=aSpec value=$aSpec.spec}>
            <{/if}>
        <span class="t-handle" specid="<{$aSpec.spec_id}>">
            <{$aSpec.spec_name|escape:'html'}>
            <input type="hidden" name="spec[<{$aSpec.spec_id}>][spec_name]" value="<{$aSpec.spec_name|escape}>">
            <input type="hidden" name="spec[<{$aSpec.spec_id}>][spec_id]" value="<{$aSpec.spec_id}>">
            <label class="spec-sum-<{$aSpec.spec_id}>"></label>
            <label class='t-del' style='display:none;'>&nbsp;&nbsp;
                <{img title="删除" class="delete" src="icons/icon_delete.gif" border='none'}>
            </label>
        </span> 
    <{/foreach}>
</div>


    <div class='spec-items division' style='border:1px #ccc solid; margin:2px 5px 0px 5px;'>
            <{if !$spec}>
               <div class='notice'><{t}>当前商品类型没有绑定默认规格，请点击右上角增加规格项<{/t}></div>
            <{/if}>
			<{foreach from=$spec item=aSpec }>
            <{if $aSpec.spec|is_array}>
                <{assign var=aSpec value=$aSpec.spec}>
            <{/if}>
         <div class='item' style='display:none;' id="spec-tab-<{$aSpec.spec_id}>">
             <table>
                <tr>
                   <td width='20%' style='vertical-align:middle;text-align:center'>
                     <span class="fontcolorGray" style="line-height:18px"><{t}>请点击右侧<{/t}><br /><{t}>添加本商品需要的<{/t}><{$aSpec.spec_name|escape:'html'}></span>
                   </td>
                   <td width='80%'>
                           <div>&nbsp;<span class='lnk add-spec-all' specid="<{$aSpec.spec_id}>"><{t}>添加全部<{/t}><{$aSpec.spec_name|escape:'html'}></span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<!--span class="fontcolorGray"><{t}>没有您需要的<{/t}><{$aSpec.spec_name|escape:'html'}><{t}>？立刻<{/t}></span><span class="lnk editspec" specid="<{$aSpec.spec_id}>"><{t}>编辑<{/t}><{$aSpec.spec_name|escape:'html'}></span--></div>
                           <ul class='goods-spec-box spec-name' specid="<{$aSpec.spec_id}>" specType="<{$aSpec.spec_type}>"> 

						   <{if $aSpec.spec_type == 'text'}>

						   <{foreach from=$aSpec.spec_value item=oItem}>
                              <li style='float:left' onmouseover="this.style.background='#ff9900';" onmouseout="this.style.background='#ffffff';" specValueId="<{$oItem.spec_value_id}>" specValue="<{$oItem.spec_value|escape:'html'}>">
							  <span><{$oItem.spec_value|htmlspecialchars}></span><span class="spec-add"><label><{t}>添加<{/t}></label></span>
							  <input type="hidden" name="spec_value_image[<{$oItem.spec_value_id}>]" id="spec_value_image_<{$oItem.spec_value_id}>" value="<{$oItem.spec_image}>" disabled/>
							  </li>
							  <{/foreach}>							  
							  <{else}>

						   <{foreach from=$aSpec.spec_value item=oItem}>
                              <li style='float:left' onmouseover="this.style.background='#ff9900';" onmouseout="this.style.background='#ffffff';" specValueId="<{$oItem.spec_value_id}>" specValue="<{$oItem.spec_value|escape:'html'}>">
							  <img src='<{if $oItem.spec_image}><{$oItem.spec_image|storager}><{else}><{$spec_default_pic|storager}><{/if}>' width=20 height=20 alt="<{$oItem.spec_value|htmlspecialchars}>"><span class="spec-add"><label><{t}>添加<{/t}></label></span>
							  <input type="hidden" name="spec_value_image[<{$oItem.spec_value_id}>]" id="spec_value_image_<{$oItem.spec_value_id}>" value="<{$oItem.spec_image|storager}>" disabled/>
							  </li>
							  <{/foreach}>

							  <{/if}>

                           </ul>
                   </td>
                </tr>
             </table>
             
             <div class='tableform'>
             <div class="division">
                  <table class="gridlist"  cellspacing="0" cellpadding="0" border="0" width="100%">
                     <thead>
                      <tr>
                        <th style="width:15%"><{t}>系统规格<{/t}></th>
                        <th><{t}>自定义规格值<{/t}></th>
						   <{if $aSpec.spec_type == 'image'}>
						<th style="width:20%"><{t}>自定义规格图片<{/t}></th>
						<{/if}>
                       
                        <th style="width:25%"><{t}>操作<{/t}></th>
                      </tr>
                    </thead>
					<tbody class='spec-body'>
					<{foreach from=$goods_spec[$aSpec.spec_id].option item=specValue}>
                       <{include file='admin/goods/detail/spec/spec_value.html'}>
					<{/foreach}>
                      
                 </tbody>
                  </table>
              </div>
             </div>
             
         </div>
		 <{/foreach}>
         
         
         <{/if}>
    </div>